package com.xbongbong.saas.enums.business;



import java.util.Objects;

public enum MarketActivityThroughEnum {

    //全部线索
    ALL_CLUE(1),
    //有效线索
    EFFECTIVE_CLUE(2),
    //转换线索
    TRANSFORMED_CLUE(3),

    UNKNOWN(-1);

    private Integer code;

    MarketActivityThroughEnum(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public static MarketActivityThroughEnum getByCode(Integer code) {
        if (Objects.equals(code, ALL_CLUE.getCode())) {
            return ALL_CLUE;
        }else if (Objects.equals(code, EFFECTIVE_CLUE.getCode())) {
            return EFFECTIVE_CLUE;
        }else if (Objects.equals(code, TRANSFORMED_CLUE.getCode())) {
            return TRANSFORMED_CLUE;
        }else {
            return UNKNOWN;
        }
    }



}
